import 'package:json_annotation/json_annotation.dart';

part 'Conversation.g.dart';

@JsonSerializable()
class Conversation {
  int? id;
  int? uid1;
  int? uid2;
  int? chatGroupId;
  int? type;
  DateTime? createTime;

  static Conversation fromJson(Map<String, dynamic> json) {
    return _$ConversationFromJson(json);
  }

  Map<String, dynamic> toJson() {
    return _$ConversationToJson(this);
  }

  @override
  String toString() {
    return 'Conversation{id: $id, uid1: $uid1, uid2: $uid2, chatGroupId: $chatGroupId, type: $type, createTime: $createTime}';
  }
}
